<template>
	<view>
		<view class="jiange">拜访信息</view>
		<view class="body">
			<view class="item">
				<text>拜访人员</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
			<view class="item">
				<text>部门</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
			<view class="item">
				<text>地址</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
			<view class="item">
				<text>拜访人</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
			<view class="item">
				<text>邀请时间</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
		</view>

		<view class="jiange">随行信息</view>
		<view class="body">
			<view class="item">
				<text>随行人员</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
			<view class="item">
				<text>车辆信息</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
		</view>

		<view class="jiange">防疫信息</view>
		<view class="body">
			<view class="item">
				<text><text v-if="a==0" style="color: red;margin-right: 5rpx;">*</text>身体状态</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
			<view class="item">
				<text><text v-if="a==0" style="color: red;margin-right: 5rpx;">*</text>体温</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
			<view class="item">
				<text><text v-if="a==0" style="color: red;margin-right: 5rpx;">*</text>现居地址</text>
				<input type="text" value="" placeholder="请输入" />
			</view>
		</view>
		<view
			style="border-top: #e3e3e3 1rpx solid;background-color: #ffffff; padding-top: 20rpx; width: 100%;position: fixed;bottom: 0;padding-bottom: 20rpx;">
			<button @click="tijiao" type="default" v-if="a==0"
				style="background-color: #007AFF;color: #fff;border-radius: 20rpx;width: 90%;">提交</button>
			<button @click="tijiao" type="default" v-if="a==1"
				style="background-color: #007AFF;color: #fff;border-radius: 20rpx;width: 90%;">通行二维码</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				item: {},
				a: 1
			}
		},
		onLoad: function(e) {
			this.a = Number(e.a)
		},
		methods: {
			tijiao() {
				// 调用提交接口

				// 成功回调
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	.jiange {
		height: 60rpx;
		width: 100%;
		background-color: #f2f2f2;
		line-height: 60rpx;
		padding-left: 30rpx;
		color: #a7a7a7;
		font-size: 30rpx;
	}

	.body {
		padding-left: 30rpx;
		line-height: 70rpx;
		font-size: 32rpx;
	}

	.item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-right: 30rpx;
		border-bottom: #f2f2f2 1rpx solid;
		text-align: end;
	}
</style>
